package dosgi.distribution.invoker;

import java.util.Map;

/**
 * Interface which defines a way for invoking methods on registered remote services.
 * 
 * @author Jaroslaw Janik
 */
public interface RemoteInvoker {

	public static final String REMOTE_PROPERTY_KEY = "remote";
	public static final String REMOTE_PROPERTY_VALUE_TRUE = "true";
	public static final String PROXY_PROPERTY_KEY = "proxy";
	public static final String PROXY_PROPERTY_VALUE_TRUE = "true";
	
	/**
	 * Method which is responsible for remote method invocation over network.
	 * 
	 * @param className Class name which remote service is registered with.
	 * @param methodName Method to be invoked.
	 * @param args Arguments' map which consists of type of argument and corresponding value.
	 * @param properties Properties' map to clearly search for expected service.
	 * @return Value returned by invocation of remote method.
	 */
	public Object invoke(String className, String methodName, Map<Class<?>, Object> args, Map<String, String> properties);
}
